﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using DataAccessTier;
using DTO;


namespace BusinessLogicTier
{
    public class HangHoaBUG
    {
        HangHoaDAO objHH = new HangHoaDAO();
        public DataTable GetHH()
        {
            return objHH.GetAllHangHoa();
        }

        public DataTable GetNXB()
        {
            return objHH.GetAllNhaXuatBan();
        }

        public DataSet GetTenNXB(string manxb)
        {
            return objHH.GetTenNhaXuatBanTheoMa(manxb);
        }

        public DataTable GetLHH()
        {
            return objHH.GetAllLoaiHangHoa();
        }

        public DataSet GetTenLHH(string maloai)
        {
            return objHH.GetTenLoaiHangHoaTheoMa(maloai);
        }

        public DataTable GetNSX()
        {
            return objHH.GetAllNhaSanXuat();
        }

        public DataSet GetTenNSX(string mansx)
        {
            return objHH.GetTenNhaSanXuatTheoMa(mansx);
        }

        public bool kiemtranmanncc(string mancc)
        {
            return objHH.kiemtratontai(mancc);
        }

        public bool Insert(HangHoa hh)
        {
            return objHH.Insert(hh);
        }

        public bool Delete(string mahang)
        {
            return objHH.Delete(mahang);
        }

        public bool kiemtratontaiHH(string mahang)
        {
            return objHH.kiemtratontaiHH(mahang);
        }

        public bool DeleteHH(string mahang)
        {
            return objHH.DeleteHH(mahang);
        }

        public bool Update(HangHoa hh)
        {
            return objHH.Update(hh);
        }

        public DataTable GetAllHangCC(string mahang)
        {
            return objHH.GetAllHangCC(mahang);
        }

        public bool UpdateHangCC(int stt, string mancc, string mahang, string tenhang)
        {
            return objHH.UpdateHangCC(stt, mancc, mahang, tenhang);
        }

        public bool KiemTraTheoMa(string mahang)
        {
            return objHH.kiemtratontaimahang(mahang);
        }

        public bool KiemTraTheoTenHang(string tenahng)
        {
            return objHH.kiemtratontaitenhang(tenahng);
        }

        public bool KiemTraTheoTacGia(string tacgia)
        {
            return objHH.kiemtratontaitacgia(tacgia);
        }

        public DataTable GetALLHHTheoMa(string mahang)
        {
            return objHH.GetAllHangHoaTheoMa(mahang);
        }

        public DataTable GetALLHHTheoTenHang(string tenhang)
        {
            return objHH.GetAllHangHoaTheoTenHang(tenhang);
        }

        public DataTable GetALLHHTheoTacGia(string tacgia)
        {
            return objHH.GetAllHangHoaTheoTacGia(tacgia);
        }
    }
}
